       function downloadfile(id)   
      {   
              window.document.write(document.getElementById(id).outerHTML);   
              window.document.execCommand("SaveAs",false,"C:\\download.xls");   
              history.go(-1);   
      } 